<?
include_once "gblinclude.lib";
include_once "loginctrl.lib";

$loginCtrl = new CLoginCtrl();

if ($_POST["process"])
	$loginCtrl->processLogin();
	
$layoutFactory = new CLayoutFactory();

$header = $layoutFactory->getHeader();
$tail = $layoutFactory->getTail();
$body = $loginCtrl->layout();
$script = $loginCtrl->createJs();

echo $header.$script.$body.$tail;

echo '<script>
		focusInput();
	</script>';
?>
